//package com.douqu.game.auth.platform;
//
//import com.bean.core.util.TwoTuple;
//import com.douqu.game.auth.database.model.RoleRecordModel;
//import com.douqu.game.auth.service.PlayerService;
//import com.douqu.game.core.e.ReturnMessage;
//import com.douqu.game.core.protobuf.SGCommonProto;
//import com.douqu.game.core.util.CoreUtils;
//import com.douqu.game.core.util.LogUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//
///**
// * Author : Bean
// * 2017-05-20 17:07
// */
//@Component
//public class  PhoneImpl implements PlatformSDK {
//
//
//    @Autowired
//    private PlayerService playerService;
//
//    @Override
//    public TwoTuple<RoleRecordModel, ReturnMessage> auth(int serverId, String account, String password, String deviceId)
//    {
//        LogUtils.info("Phone登录参数:" + account+"  " + password);
//        account = CoreUtils.createAccount(account, SGCommonProto.E_CHANNEL_TYPE.CHANNEL_TYPE_PHONE);
//
//        RoleRecordModel record = playerService.getUserRecordByAccount(account);
//        if(record == null)
//        {   //需要创建
//            record = new RoleRecordModel();
//            record.setDeviceId(deviceId);
//            record.setAccount(account);
//            record.setChannel(SGCommonProto.E_CHANNEL_TYPE.CHANNEL_TYPE_PHONE_VALUE);
//            record.setServerId(serverId);
//        }
//        return new TwoTuple<>(record, null);
//
//    }
//
//
//}
